import request from '/@/utils/request.ts';

export function getSysResourceList(params: object) {
	return request({
		url: 'core/sysResource/page',
		method: 'get',
		params,
	});
}

export function addSysResource(data: object) {
	return request({
		url: 'core/sysResource/',
		method: 'POST',
		data: data,
	});
}

export function getSysResourceInfo(resourceId: any) {
	return request({
		url: `core/sysResource/${resourceId}`,
		method: 'GET',
	});
}

export function editSysResource(data: object, resourceId: any) {
	return request({
		url: `core/sysResource/${resourceId}`,
		method: 'PUT',
		data: data,
	});
}

export function delSysResource(resourceId: any) {
	return request({
		url: `core/sysResource/${resourceId}`,
		method: 'DELETE',
	});
}
